package tw.com.softleader.reins.demo.coffee.entity;

public class Coffee {
	
	public String getBrand() {
		return brand;
	}
	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getSize() {
		return this.size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	
	
	
	@Override
	public boolean equals(Object obj) {
		if (obj!=null && obj instanceof Coffee) {
			Coffee objCoffee = (Coffee) obj;
			if (objCoffee.getBrand().equals(this.brand)&&
					objCoffee.getSize().equals(this.size)&&
					objCoffee.getPrice().equals(this.price)&&
					objCoffee.getType().equals(this.type)) {
				return true;
				
			}
		}
		return false;
	}
	


	@Override
	public String toString() {
		return "Coffee [brand=" + brand + ", size=" + size + ", type=" + type
				+ ", id=" + id + ", price=" + price + "]";
	}



	private String brand;

	private String size;
	private String type;
	private Long id;
	private Double price;



}
